/* For Z-Blog erx_VIP [ https://app.zblogcn.com/?id=42368 ] */ $(function(){ var erxVIPStyle = ` `; var erxVIPDom = `
`; $("head").append(erxVIPStyle); $("body").append(erxVIPDom); $(".erx-vip-inner .e-close").click(function(){ $(".erx-vip-wrap").removeClass("erxshow").children().removeClass("erxact"); $(this).hasClass("e-succeed") ? location.reload() : ''; }); $("body").on("click", "a[href='#vipmember']", function() { $(".erx-vip-wrap").addClass("erxshow").find(".e-code").focus(); setTimeout(function(){ $(".erx-vip-inner").addClass("erxact"); }, 50); return false; }); $(".erx-vip-form button").click(function(){ let $self = $(this), btn_t = $self.text(), $code = $(".erx-vip-form .e-code"), code = $code.val(), token = $(".erx-vip-form .e-token").val(); if($self.hasClass("erxact")){ return; } if(code.length != 18){ erxVIPtips("\u4f1a\u5458\u7801\u586b\u5199\u9519\u8bef\uff01", "red"); $code.focus().addClass("erxerr"); setTimeout(function(){ $code.removeClass("erxerr"); }, 1500); return; } $self.addClass("erxact").text("\u6b63\u5728\u5904\u7406\u2026\u2026"); $.post(bloghost + "zb_users/plugin/erx_VIP/" + "post" + "." + "php", { "code":code, "token":token, }, function(data){ let s = data; if((s.search("faultCode")>0)&&(s.search("faultString")>0)){ erxVIPtips(s.match("